//
//  Dive.h
//  DiveCalcsApp
//
//  Created by Donald MacKay on 11-04-07.
//  Copyright 2011 www.H2OWorx.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Constants.h"

@interface Dive : NSObject {
    NSInteger maxDepth;
    NSInteger diveTime;
    NSInteger gasSwitchDepth;
    NSInteger minGasAscentTime;
    NSNumber *consumptionRate;
    BOOL measurementSystem;
    NSDictionary *msText;
    NSMutableArray *diveProfile;
    NSMutableArray *ascRateChangePercent;
    NSMutableArray *ascRateChangeDepth;
    NSMutableArray *ascRateTimeInterval;


@private
    
}
@property (readwrite) NSInteger maxDepth;
@property (readwrite) NSInteger diveTime;
@property (readwrite) NSInteger gasSwitchDepth;
@property (readwrite) NSInteger minGasAscentTime;
@property (nonatomic, retain) NSNumber *consumptionRate;
@property (readwrite) BOOL measurementSystem;
@property (nonatomic, retain) NSDictionary *msText;
@property (nonatomic, retain) NSMutableArray *diveProfile;
@property (nonatomic, retain) NSMutableArray *ascRateChangePercent;
@property (nonatomic, retain) NSMutableArray *ascRateChangeDepth;
@property (nonatomic, retain) NSMutableArray *ascRateTimeInterval;


-(id) initWithDepth: (NSInteger) d time: (NSInteger) t switchDepth: (NSInteger) gs SAC: (float) sac andIsMetric:(BOOL) metric;

// Utilitly methods
-(double) aveDepth;
-(void) ascentTime;
-(void) deepStops;
-(int) minGas;
-(long) totalDeco;
-(NSArray *) buildProfile;
-(float) calcATA:(float ) withDepth;
-(float) calcSegmentCNSTime: (diveSegment) segment segmentTime: (long) time maximumDepth: (long) mDepth andStdGas: (float) stdGas;
- (float) calcATA : (float) theDepth;
-(float) selectStandardGas;

@end
